package com.li.dao;

import com.li.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserMapper {
    public int addUser(User user);
    public User queryUserById(@Param("id") long id);
    public int updateUser(User user);
    public int deleteUser(@Param("id") long id);
    public User login(@Param("username") String name,@Param("password") String password);
    public List<User> queryAllUser();
    public User queryUserByName(@Param("username") String namename);
    //获取用户权限
    public String getUserPosition(long grade);
}
